﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;

namespace RestApp.UI.App_Start
{
    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            CssBundles(bundles);
            JsBundles(bundles);
			BundleTable.EnableOptimizations = false;
		//#if DEBUG
		//	BundleTable.EnableOptimizations = false;
		//#else 
		//	BundleTable.EnableOptimizations = true;
		//#endif
		}

        private static void CssBundles(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/bundles/layoutcss").Include(
                    "~/Content/bootstrap.css",
	                "~/Content/Template/custom.css"
                ));

            bundles.Add(new StyleBundle("~/bundles/dataTable").Include(
                    "~/Content/Template/dataTables.bootstrap.css"
                ));

			bundles.Add(new StyleBundle("~/bundles/calendarStyles").Include(
					"~/Content/fullcalendar.css",
					"~/Content/Clockpicker/clockpicker.css",
					"~/Content/fullcalendarCustomization.css"
				));
        }

        private static void JsBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/layout").Include(
                "~/Scripts/jquery-2.1.3.js",
	            "~/Scripts/bootstrap.js"
            ));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                "~/Scripts/jquery.unobtrusive.js",
                "~/Scripts/jquery.validate.js"
            ));

            bundles.Add(new ScriptBundle("~/bundles/addUser").Include(
                    "~/Scripts/bootstrap-datepicker.js",
	                "~/Scripts/globalize/globalize.js",
	                "~/Scripts/globalize/cultures/globalize.culture.ru-RU.js",
	                "~/Scripts/bootstrap-datepicker-globalize.js",
	                "~/Scripts/locales/bootstrap-datepicker.ru.js",
	                "~/Scripts/jquery.inputmask/jquery.inputmask.js",
                    "~/Scripts/SiteScripts/AddUserPage.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/editUser").Include(
                    "~/Scripts/bootstrap-datepicker.js",
                    "~/Scripts/globalize/globalize.js",
                    "~/Scripts/globalize/cultures/globalize.culture.ru-RU.js",
                    "~/Scripts/bootstrap-datepicker-globalize.js",
                    "~/Scripts/locales/bootstrap-datepicker.ru.js",
                    "~/Scripts/jquery.inputmask/jquery.inputmask.js",
                    "~/Scripts/SiteScripts/AddUserPage.js",
                    "~/Scripts/SiteScripts/EditPage.js"

                ));

            bundles.Add(new ScriptBundle("~/bundles/listUsers").Include(
                     "~/Scripts/jquery.dataTables.js",
                    "~/Scripts/dataTables.bootstrap.js",
                    "~/Scripts/SiteScripts/listUsers.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/listJobs").Include(
                     "~/Scripts/jquery.dataTables.js",
                    "~/Scripts/dataTables.bootstrap.js",
                    "~/Scripts/SiteScripts/listPosts.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/calendar").Include(
                    "~/Scripts/CalendarLocalization/moment.min.js",
                    "~/Scripts/fullcalendar.js",
                    "~/Scripts/CalendarLocalization/ru.js",
                    "~/Scripts/bootstrap.js",
                    "~/Scripts/clockpicker.js",
                    "~/Scripts/SiteScripts/Calendar.js"
                ));

			bundles.Add(new ScriptBundle("~/bundles/jobFacts").Include(
					"~/Scripts/bootstrap-datepicker.js",
	                "~/Scripts/globalize/globalize.js",
	                "~/Scripts/globalize/cultures/globalize.culture.ru-RU.js",
	                "~/Scripts/bootstrap-datepicker-globalize.js",
	                "~/Scripts/locales/bootstrap-datepicker.ru.js",
					"~/Scripts/SiteScripts/jobFacts.js"
				));

			bundles.Add(new ScriptBundle("~/bundles/fillJobTime").Include(
					"~/Scripts/CalendarLocalization/moment.min.js",
					"~/Scripts/CalendarLocalization/ru.js",
					"~/Scripts/bootstrap.js",
					"~/Scripts/clockpicker.js",
					"~/Scripts/SiteScripts/fillJobTime.js"
				));

            bundles.Add(new ScriptBundle("~/bundles/workTimeUser").Include(
                    "~/Scripts/bootstrap-datepicker.js",
	                "~/Scripts/globalize/globalize.js",
	                "~/Scripts/globalize/cultures/globalize.culture.ru-RU.js",
	                "~/Scripts/bootstrap-datepicker-globalize.js",
	                "~/Scripts/locales/bootstrap-datepicker.ru.js",
                    "~/Scripts/SiteScripts/WorkTimeReport.js"
                ));
        }
    }
}